class Profile < ActiveRecord::Base
  belongs_to :user
  has_many :accounts
  has_many :reports

  #extend FriendlyId
  #friendly_id :slug_candidates, use: :slugged
  #def slug_candidates
  #  [
  #    [:name, :born],
  #    [:name, :born, :weight],
  #  ]
  #end

  attr_accessor :height_feet, :height_inches
  before_save :combine_height if @feet.present?

  mount_uploader :avatar, AvatarUploader
  
  def height_feet=(feet)
    @feet = feet
  end

  def height_inches=(inches) #on save?
    @inches = inches
  end

  def combine_height
    self.height = @feet + "\' " + @inches + "\"" #if @feet.present?
  end

end
